package com.mallcloud.mall.app.controller;

import com.mallcloud.mall.common.core.util.R;
import com.mallcloud.mall.mall.api.entity.MallAdvertisingModel;
import com.mallcloud.mall.mall.service.MallAdvertisingService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "app-广告")
@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping("/app/advertising")
public class AppAdvertisingController {
	private final MallAdvertisingService mallAdvertisingService;

	@ApiOperation("列表查询")
	@GetMapping("/list")
	public R<List<MallAdvertisingModel>> list(MallAdvertisingModel dto) {
		return R.ok(mallAdvertisingService.listAdvertising(dto));
	}
}
